import math


def convertBytes(bytes, lst=None):
    if lst is None:
        lst = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB']
    i = int(math.floor(  # 舍弃小数点，取小
        math.log(bytes, 1024)  # 求对数(对数：若 a**b = N 则 b 叫做以 a 为底 N 的对数)
    ))

    if i >= len(lst):
        i = len(lst) - 1
    return ('%.2f' + " " + lst[i]) % (bytes / math.pow(1024, i))


def main():
    lst = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB']
    bytes = int(input('Bytes: '))
    print(convertBytes(bytes, lst=lst))


if __name__ == '__main__':
    main()
